<!--门诊费用结算明细-->
<template>
	<view>
		<view class="item">
			<h3>项目清单</h3>
			<ul>
				<li v-for="(item,index) in params.sfmx" :key="index">
					<view class="left">
						<span>{{item.xmmc00}}</span>
						<br/>
						<text>{{item.xmgg00}}</text>
					</view>
					<span class="right">{{item.xmje00}}元</span>
				</li>
			</ul>
		</view>
		<view class="doctor">
			<ul>
				<li>
					<span class="left">开单医生</span>
					<span class="right">{{params.ysxm00}}</span>
				</li>
				<li>
					<span class="left">开单科室</span>
					<span class="right">{{params.ksmc00}}</span>
				</li>
				<li>
					<span class="left">系统跟踪号</span>
					<span class="right">{{params.jfdjh0}}</span>
				</li>
				<li>
					<span class="left">开单时间</span>
					<span class="right">{{params.jssfrq}}</span>
				</li>
			</ul>
		</view>
		<view class="footer" v-if="flag">
			<ul>
				<li>合计金额 <h3 class="right">{{params.bcfyze}}元</h3></li>
				<li><label>支付时间</label><span class="right">2021-01-22 09:00:00</span></li>
			</ul>
		</view>
		<view class="footer" v-else style="align-items: center;justify-content: center;">
			<view class="money">费用合计 <h3>{{params.bcfyze}}元</h3></view>
			<!-- <button class="btn right">微信支付</button> -->
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				dataList: [],
				params:{},
				flag:false
			}
		},
		onShow() {
		},
		onLoad() {
			//
			const eventChannel = this.getOpenerEventChannel();
			eventChannel.on('params', params=> {
			    console.log(params);
				this.params=params;
			})
			if(this.params.sfmx){
				this.init();
			}else{
				uni.showModal({
					title:"温馨提示",
					content:"当前项目不存在收费明细,点击确定返回收费列表",
					showCancel:false,
					success(res){
						if(res.confirm){
							uni.redirectTo({
								url:"clinicPayRecord"
							})
						}
					}
				})
			}
			
		},
		methods: {
			init(){
				let user=uni.getStorageSync("user");
				//查看门诊处方单
				let params={
					"kh0000":user.kh0000,
					"klx000":"3",
					"patid0":user.patid0,
					"hzsfbh":"0",
					"xming0":user.xming0,
					"jfdjh0":this.params.jfdjh0,
					"ywlsh0":""+new Date().getTime(),
					"funid":"F07.06.02.02"
				}
				this.$postJson("/qnyesb/qnyesbproxy",params,res=>{
					if(res.state==0){
						this.dataList=res.data.retrieve;
					}else{
						uni.showToast({
							title:res.message,
							icon:"none",
							duration:5000
						})
					}
				})
			}
		}
	}
</script>

<style>
.item{
	
	width: 92%;
	background-color: #FFFFFF;
	display: flow-root;
	text-align: center;
	margin: 0 auto;
	padding: 10px;
	border-radius: 8px;
	position: relative;
	top: 10px;
}
.item h3{
	border-bottom: 1px solid #F0F0F0;
	padding: 10px;
	padding-bottom: 20px;
}
.item ul{
	margin-top: 20px;
}
.item ul li{
	height: 50px;
	display: flex;
	align-items: center;
}
.item ul li .left{
	width: 100%;
	max-height: 40px;
	overflow-y: hidden;
	display: -webkit-box;
	word-break: break-all;
	line-height: 20px;
	text-overflow: ellipsis;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	text-align: left;
}
.item ul li .right{
	position: relative;
	right: 0;
	width: 120px;
	text-align: right;
	
}
.doctor{
	width: 92%;
	background-color: #FFFFFF;
	display: flow-root;
	margin: 0 auto;
	margin-top: 10px;
	border-radius: 8px;
	padding-left: 10px;
	padding-right: 10px;
}
.doctor ul{
	
}
.doctor ul li{
	float: left;
	width: 100%;
	border-bottom: 1px solid #F5F5F5;
	line-height: 65px;
}
.footer{
	display: flex;
	background: #FFFFFF;
	position: fixed;
	bottom: 0px;
	width: 90%;
	padding: 20px;
	line-height: 50px;
	box-shadow: -1px 0px 6px rgba(0, 0, 0, 0.16);
}
.footer ul{
	width: 100%;
}
.footer ul li{
	width: 100%;
}
.footer .btn{
	
	background-color: #3692FF;
	width: 142px;
	height: 46px;
	color: #FFFFFF;
	border-radius: 28px;
	margin-right: 30px;
	
}
.footer .money{
	display: flex;
}
.footer h3{
	margin-left: 10px;
	color:#3692FF;
}
</style>
